<?php

/**
 * Created by PhpStorm.
 * User: andy
 * Date: 16/4/9
 * Time: 12:22
 */
class Domain_Apply {
    public $db;

    public function  __construct() {
        $this->db = new Model_Apply();

    }

    /**
     * @param $name string  姓名
     * @param $tel string 电话
     * @param $email string 邮箱
     * @param $corp string 公司名称
     */
    public function addUser($name,$tel,$email,$corp) {
        $time = DI()->helper->getTime();
        $ip = DI()->helper->getClientIp();
        $userinfo= $this->db->insertUser($name,$tel,$email,$corp, $time, $ip);

        if($userinfo){
            DI()->cache->sAdd("alimama:tels01", $tel);
        }
        return $userinfo;
    }


}